/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.proposeproduct.service.impl.ProposeSpecificationServiceImpl
   Module Description   :

   Date Created      : 2009/11/17
   Original Author   : ellen.li
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.proposeproduct.service.impl;

import java.util.List;

import com.yaodian100.core.common.dao.impl.CommonCriteria;
import com.yaodian100.core.common.service.impl.DomainServiceImpl;
import com.yaodian100.ec.proposeproduct.entity.ProposeSpecification;
import com.yaodian100.ec.proposeproduct.service.ProposeSpecificationService;

/**
 * @author ellen.li
 * 
 */
public class ProposeSpecificationServiceImpl extends DomainServiceImpl<ProposeSpecification> implements
		ProposeSpecificationService {

	public List<ProposeSpecification> getAllSpecificationByProductId(String prodId) {
		CommonCriteria cc = new CommonCriteria();
		cc.addEq("proposeProductId", prodId);
		return getList(0, -1, cc, new String[] { "id" });
	}

	public List<ProposeSpecification> getSpecificationByProductIdAndMainName(String prodId, String mainSpecName) {
		CommonCriteria cc = new CommonCriteria();
		cc.addEq("proposeProductId", prodId);
		cc.addEq("prpsMainSpecName", mainSpecName.trim());
		return getList(0, -1, cc, new String[] { "id", "isCover desc" });
	}
}
